home *** CD-ROM | disk | FTP | other *** search
/ Ian & Stuart's Australian Mac: Not for Sale / Another.not.for.sale (Australia).iso / fade into you / getting there / Apps / MOO-1.7.6.src / inc / my-stdlib.h < prev    next >
Text File  |  1994-11-02  |  3KB  |  99 lines

  1. /******************************************************************************
  2.   Copyright (c) 1992 Xerox Corporation.  All rights reserved.
  3.   Portions of this code were written by Stephen White, aka ghond.
  4.   Use and copying of this software and preparation of derivative works based
  5.   upon this software are permitted.  Any distribution of this software or
  6.   derivative works must comply with all applicable United States export
  7.   control laws.  This software is made available AS IS, and Xerox Corporation
  8.   makes no warranty about the software, its performance or its conformity to
  9.   any specification.  Any person obtaining a copy of this software is requested
  10.   to send their name and post office or electronic mail address to:
  11.     Pavel Curtis
  12.     Xerox PARC
  13.     3333 Coyote Hill Rd.
  14.     Palo Alto, CA 94304
  15.     Pavel@Xerox.Com
  16.  *****************************************************************************/
  17.  
  18. #ifndef My_Stdlib_H
  19. #define My_Stdlib_H 1
  20.  
  21. #include "config.h"
  22.  
  23. #if HAVE_STDLIB_H
  24.  
  25. #include <stdlib.h>
  26.  
  27. #if NEED_MALLOC_H
  28. #include <malloc.h>
  29. #endif
  30.  
  31. #else /* !HAVE_STDLIB_H */
  32.  
  33. #include "my-types.h"
  34.  
  35. extern void    abort(void);
  36. extern int    abs(int);
  37. extern void    exit(int);
  38. extern void    free(void *);
  39. extern void    *malloc(size_t);
  40. extern int    rand(void);
  41. extern void    *realloc(void *, size_t);
  42. extern void    srand(unsigned);
  43.  
  44. #endif /* !HAVE_STDLIB_H */
  45.  
  46. #if NDECL_STRTOL
  47.   extern long            strtol(const char *, char **, int);
  48. # if HAVE_STRTOUL
  49.     extern unsigned long    strtoul(const char *, char **, int);
  50. # else
  51. #   define strtoul        strtol
  52. # endif
  53. #endif
  54.  
  55. #if NDECL_RANDOM
  56. extern long    random(void);
  57. #endif
  58.  
  59. #if NDECL_SRANDOM
  60. extern int    srandom(unsigned);
  61. #endif
  62.  
  63. #endif
  64.  
  65. /* $Log: my-stdlib.h,v $
  66.  * Revision 1.10  1993/08/04  01:16:15  pavel
  67.  * Added default definition for strtoul(), as a synonym for strtol().
  68.  *
  69.  * Revision 1.9  1993/08/04  00:27:53  pavel
  70.  * Added declaration for strtoul().
  71.  *
  72.  * Revision 1.8  1993/08/04  00:13:30  pavel
  73.  * Added declarations of random() and srandom(), moved from random.h.
  74.  *
  75.  * Revision 1.7  1992/10/23  23:03:47  pavel
  76.  * Added copyright notice.
  77.  *
  78.  * Revision 1.6  1992/10/23  19:31:29  pavel
  79.  * Added protection against multiple inclusions, for systems that aren't
  80.  * clever enough to do that for themselves.
  81.  * Added declaration of realloc().
  82.  * Added support for NEED_MALLOC_H.
  83.  *
  84.  * Revision 1.5  1992/10/21  03:02:35  pavel
  85.  * Converted to use new automatic configuration system.
  86.  *
  87.  * Revision 1.4  1992/10/17  20:39:19  pavel
  88.  * Removed apparently-useless declaration of exit()... (*sigh*)
  89.  *
  90.  * Revision 1.3  1992/09/27  19:25:12  pavel
  91.  * Added declaration of exit() for SunOS.
  92.  *
  93.  * Revision 1.2  1992/07/30  00:33:28  pavel
  94.  * Add support for compiling on RISC/os 4.52 and NonStop-UX A22.
  95.  *
  96.  * Revision 1.1  1992/07/20  23:23:12  pavel
  97.  * Initial RCS-controlled version.
  98.  */
  99.